home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Sound Editor / SoundEditor.make < prev   
Encoding:
Text File  |  1995-12-11  |  12.1 KB  |  345 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        SoundEditor.make
  3. #
  4. #    Contains:    Makefile for OpenDoc SoundEditor sample part
  5. #
  6. #    Written by:    Steve Smith
  7. #
  8. #    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9. #
  10.  
  11. #---------------------------------------------------------------------------    
  12. # PROJECT VARIABLES
  13. #---------------------------------------------------------------------------    
  14.  
  15. TargetName = SoundEditor
  16. TargetNameILink = {TargetName} (68k)
  17. TargetNamePPCLink = {TargetName} (PPC)
  18. TargetNameFat = {TargetName} (fat)
  19.  
  20. TargetCreatorType = SNED
  21.  
  22. AdditionalIncludes = -i "{somSourceDir}" -i "{SourceDir}"
  23. AdditionalIDLIncludes = -i "{SourceDir}"
  24.  
  25. #---------------------------------------------------------------------------    
  26. # CFM/PEF Version Numbers
  27. #---------------------------------------------------------------------------    
  28. # For detailed instructions on proper CFM/PEF version numbering, see
  29. # Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  30. #---------------------------------------------------------------------------    
  31.  
  32. CurrentLibraryVersion =        0x01018000        # 1.0.1 Final
  33. LibraryExportsVersion =        0x00000000        # 0.0
  34. LibraryCodeVersion =        0x00000000        # 0.0
  35.  
  36. #---------------------------------------------------------------------------    
  37. # DIRECTORY DEPENDENCIES
  38. #---------------------------------------------------------------------------    
  39.  
  40. "{TargetDir}"  ƒ "{SourceDir}"
  41. "{ObjectsDir}" ƒ "{SourceDir}"
  42. "{ObjectsDir}" ƒ "{somSourceDir}"
  43. "{ObjectsDir}" ƒ "{ODUtilsImplDir}"
  44.  
  45. #---------------------------------------------------------------------------    
  46. # ROOT TARGET
  47. #---------------------------------------------------------------------------    
  48.  
  49. BUILDPPCLINK ƒ ∂
  50.     "{CppPrecompiledHeaders}"            ∂
  51.     "{TargetDir}{TargetNamePPCLink}"    ∂
  52.     "{somSourceDir}som_SoundEditor.exp"
  53.  
  54. BUILDILINK ƒ ∂
  55.     "{CppPrecompiledHeaders}"            ∂
  56.     "{TargetDir}{TargetNameILink}"        ∂
  57.     "{somSourceDir}som_SoundEditor.exp"
  58.  
  59. BUILDREZ ƒ ∂
  60.     "{ObjectsDir}{TargetName}.PPC.rsrc"    ∂
  61.     "{ObjectsDir}{TargetName}.68k.rsrc"
  62.  
  63. BUILDIDL ƒ ∂
  64.     "{somSourceDir}som_SoundEditor.xih"                ∂
  65.     "{somSourceDir}som_SoundEditor.xh"                ∂
  66.     "{somSourceDir}som_SoundEditor.cpp"                ∂
  67.     "{somSourceDir}som_SoundEditor.exp"                ∂
  68.     "{somSourceDir}som_SoundEditorSI.xih"            ∂
  69.     "{somSourceDir}som_SoundEditorSI.xh"            ∂
  70.     "{somSourceDir}som_SoundEditorSI.cpp"            ∂
  71.     "{somSourceDir}som_SoundEditorSI.exp"            ∂
  72.     "{somSourceDir}som_SESettingsExtension.xih"        ∂
  73.     "{somSourceDir}som_SESettingsExtension.xh"        ∂
  74.     "{somSourceDir}som_SESettingsExtension.cpp"        ∂
  75.     "{somSourceDir}som_SESettingsExtension.exp"
  76.                 
  77. #---------------------------------------------------------------------------    
  78. # FILE LIST VARIABLES
  79. #---------------------------------------------------------------------------    
  80.  
  81. SoundEditorOBJECTS = ∂
  82.     "{ObjectsDir}SoundEditor.cpp.o"            ∂
  83.     "{ObjectsDir}SoundEditorGlobals.cpp.o"    ∂
  84.     "{ObjectsDir}SoundHandling.cpp.o"        ∂
  85.     "{ObjectsDir}SoundEditorObj.cpp.o"        ∂
  86.     "{ObjectsDir}SoundEditorUtils.cpp.o"    ∂
  87.     "{ObjectsDir}SampleCollections.cpp.o"    ∂
  88.     "{ObjectsDir}SESettingsExtension.cpp.o"    ∂
  89.  
  90. somSoundEditorOBJECTS = ∂
  91.     "{ObjectsDir}som_SoundEditorInit.cpp.o"        ∂
  92.     "{ObjectsDir}som_SoundEditor.cpp.o"            ∂
  93.     "{ObjectsDir}som_SoundEditorSI.cpp.o"        ∂
  94.     "{ObjectsDir}som_SESettingsExtension.cpp.o"    ∂
  95.  
  96. OpenDocUtilityOBJECTS = ∂
  97.     "{ObjectsDir}AltPoint.cpp.o"             ∂
  98.     "{ObjectsDir}AltPoly.cpp.o"             ∂
  99.     "{ObjectsDir}BndNSUtl.cpp.o"             ∂
  100.     "{ObjectsDir}Crawl.cpp.o"                 ∂
  101.     "{ObjectsDir}DocUtils.cpp.o"             ∂
  102.     "{ObjectsDir}Except.cpp.o"                 ∂
  103.     "{ObjectsDir}FocusLib.cpp.o"             ∂
  104.     "{ObjectsDir}IText.cpp.o"                 ∂
  105.     "{ObjectsDir}FlipEnd.cpp.o"             ∂
  106.     "{ObjectsDir}InfoUtil.cpp.o"             ∂
  107.     "{ObjectsDir}ISOStr.cpp.o"                 ∂
  108.     "{ObjectsDir}LinkList.cpp.o"             ∂
  109.     "{ObjectsDir}NmSpcUtl.cpp.o"             ∂
  110.     "{ObjectsDir}ODDebug.cpp.o"             ∂
  111.     "{ObjectsDir}ODDesUtl.cpp.o"             ∂
  112.     "{ObjectsDir}ODMemory.cpp.o"            ∂
  113.     "{ObjectsDir}ODNew.cpp.o"                ∂
  114.     "{ObjectsDir}ODUtils.cpp.o"                ∂
  115.     "{ObjectsDir}PasclStr.cpp.o"            ∂
  116.     "{ObjectsDir}PlfmFile.cpp.o"             ∂
  117.     "{ObjectsDir}StorUtil.cpp.o"            ∂
  118.     "{ObjectsDir}StdTypIO.cpp.o"            ∂
  119.     "{ObjectsDir}TempIter.cpp.o"            ∂
  120.     "{ObjectsDir}TempObj.cpp.o"                ∂
  121.     "{ObjectsDir}UseRsrcM.cpp.o"             ∂
  122.     "{ObjectsDir}WinUtils.cpp.o"             ∂
  123.                         
  124. #---------------------------------------------------------------------------    
  125. # DEPENDENCIES
  126. #---------------------------------------------------------------------------    
  127.  
  128. # --- IDL ---
  129.  
  130. "{somSourceDir}"som_SoundEditor.cpp ƒ    ∂
  131.     "{somSourceDir}"som_SoundEditor.idl    ∂
  132.     "{ODIDLIntfDir}"Part.idl
  133.     
  134. "{somSourceDir}"som_SoundEditor.xih ƒ    ∂
  135.     "{somSourceDir}"som_SoundEditor.xh    ∂
  136.     "{somSourceDir}"som_SoundEditor.idl    ∂
  137.     "{ODIDLIntfDir}"Part.idl
  138.     
  139. "{somSourceDir}"som_SoundEditor.xh ƒ    ∂
  140.     "{somSourceDir}"som_SoundEditor.idl    ∂
  141.     "{SourceDir}"SoundEditorVers.h        ∂
  142.     "{ODIDLIntfDir}"Part.idl
  143.  
  144. "{somSourceDir}"som_SoundEditorSI.cpp ƒ    ∂
  145.     "{somSourceDir}"som_SoundEditorSI.idl    ∂
  146.     "{ODIDLIntfDir}"Extensn.idl
  147.     
  148. "{somSourceDir}"som_SoundEditorSI.xih ƒ    ∂
  149.     "{somSourceDir}"som_SoundEditorSI.xh    ∂
  150.     "{somSourceDir}"som_SoundEditorSI.idl    ∂
  151.     "{ODIDLIntfDir}"Extensn.idl
  152.     
  153. "{somSourceDir}"som_SoundEditorSI.xh ƒ    ∂
  154.     "{somSourceDir}"som_SoundEditorSI.idl    ∂
  155.     "{ODIDLIntfDir}"Extensn.idl
  156.  
  157. "{somSourceDir}"som_SESettingsExtension.cpp ƒ    ∂
  158.     "{somSourceDir}"som_SESettingsExtension.idl    ∂
  159.     "{ODIDLIntfDir}"Settings.idl
  160.     
  161. "{somSourceDir}"som_SESettingsExtension.xih ƒ    ∂
  162.     "{somSourceDir}"som_SESettingsExtension.xh    ∂
  163.     "{somSourceDir}"som_SESettingsExtension.idl    ∂
  164.     "{ODIDLIntfDir}"Settings.idl
  165.     
  166. "{somSourceDir}"som_SESettingsExtension.xh ƒ    ∂
  167.     "{somSourceDir}"som_SESettingsExtension.idl    ∂
  168.     "{ODIDLIntfDir}"Settings.idl
  169.  
  170. # --- SOURCE ---
  171.  
  172. "{ObjectsDir}SoundEditor.cpp.o" ƒ                                ∂
  173.     "{CppPrecompiledHeaders}"                                    ∂
  174.     "{SourceDir}SoundEditor.cpp"                                ∂
  175.     "{SourceDir}SoundEditor.h"                                    ∂
  176.     "{SourceDir}SoundEditorDef.h"                                ∂
  177.     "{SourceDir}SoundEditorUtils.h"                                ∂
  178.     "{SourceDir}SoundHandling.h"                                ∂
  179.     "{SourceDir}SESettingsExtension.h"                            
  180.     
  181. "{ObjectsDir}SoundEditorUtils.cpp.o" ƒ                            ∂
  182.     "{CppPrecompiledHeaders}"                                    ∂
  183.     "{SourceDir}SoundEditorUtils.cpp"                            ∂
  184.     "{SourceDir}SoundEditorUtils.h"                                
  185.     
  186. "{ObjectsDir}SoundEditorObj.cpp.o" ƒ                            ∂
  187.     "{CppPrecompiledHeaders}"                                    ∂
  188.     "{SourceDir}SoundEditorObj.cpp"                                ∂
  189.     "{SourceDir}SoundEditorObj.h"                                
  190.  
  191. "{ObjectsDir}SoundHandling.cpp.o" ƒ                                ∂
  192.     "{CppPrecompiledHeaders}"                                    ∂
  193.     "{SourceDir}SoundHandling.cpp"                                ∂
  194.     "{SourceDir}SoundHandling.h"                                
  195.     
  196. "{ObjectsDir}SESettingsExtension.cpp.o" ƒ                        ∂
  197.     "{CppPrecompiledHeaders}"                                    ∂
  198.     "{SourceDir}SESettingsExtension.cpp"                        ∂
  199.     "{SourceDir}SESettingsExtension.h"
  200.  
  201. "{ObjectsDir}SampleCollections.cpp.o" ƒ                            ∂
  202.     "{CppPrecompiledHeaders}"                                    ∂
  203.     "{SourceDir}SampleCollections.cpp"                            ∂
  204.     "{SourceDir}SampleCollections.h"                            
  205.  
  206. # --- SOM OBJECTS ---
  207.  
  208. "{ObjectsDir}som_SoundEditor.cpp.o"    ƒ                            ∂
  209.     "{CppPrecompiledHeaders}"                                    ∂
  210.     "{somSourceDir}som_SoundEditor.cpp"                            ∂
  211.     "{somSourceDir}som_SoundEditor.xih"
  212.  
  213. "{ObjectsDir}som_SoundEditorInit.cpp.o" ƒ                        ∂
  214.     "{CppPrecompiledHeaders}"                                    ∂
  215.     "{somSourceDir}som_SoundEditorInit.cpp"                        ∂
  216.     "{somSourceDir}som_SoundEditor.xh"    
  217.  
  218. "{ObjectsDir}som_SoundEditorSI.cpp.o" ƒ                            ∂
  219.     "{CppPrecompiledHeaders}"                                    ∂
  220.     "{somSourceDir}som_SoundEditorSI.cpp"                        ∂
  221.     "{somSourceDir}som_SoundEditorSI.xh"    
  222.  
  223. "{ObjectsDir}som_SESettingsExtension.cpp.o" ƒ                    ∂
  224.     "{CppPrecompiledHeaders}"                                    ∂
  225.     "{somSourceDir}som_SESettingsExtension.cpp"                    ∂
  226.     "{somSourceDir}som_SESettingsExtension.xih"                    ∂
  227.  
  228. #---------------------------------------------------------------------------    
  229. # BUILD LIBRARIES
  230. #---------------------------------------------------------------------------    
  231.  
  232. # --- 68k Link ---
  233.  
  234. "{TargetDir}{TargetNameILink}" ƒƒ    {SoundEditorOBJECTS}        ∂
  235.                                     {somSoundEditorOBJECTS}        ∂
  236.                                     {OpenDocUtilityOBJECTS}        ∂
  237.                                     "{somSourceDir}som_SoundEditor.exp"
  238.     Echo Linking:    {TargetNameILink}
  239.     {LinkTool}    ∂
  240.         -export `ConvertExportList "{somSourceDir}som_SoundEditor.exp"` ∂
  241.         {ILinkOptions}                                        ∂
  242.         {ILinkShLibOptions}                                    ∂
  243.         -init SoundEditorCFMInit                            ∂
  244.         -vercur {CurrentLibraryVersion}                        ∂
  245.         -verdef {LibraryExportsVersion}                        ∂
  246.         -verimp {LibraryCodeVersion}                        ∂
  247.         {ShLibPreLibraries}                                    ∂
  248.         {SoundEditorOBJECTS}                                ∂
  249.         {somSoundEditorOBJECTS}                                ∂
  250.         {OpenDocUtilityOBJECTS}                                ∂
  251.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  252.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  253.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  254.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  255.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  256.         "{ODCFMLibrariesDir}OpenDoc Messaging.stub"            ∂
  257.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  258.         {ShLibPostLibraries}                                ∂
  259.         -o "{ObjectsDir}{TargetNameILink}".seg
  260.     If !{Status}
  261.         Echo Building: {TargetNameILink}.SYM
  262.         {SymTool} "{ObjectsDir}{TargetNameILink}".seg.NJ    ∂
  263.                 -o "{TargetDir}{TargetNameILink}".SYM -sym 3.2
  264.         Echo Building: {TargetNameILink}∂'s code∂/data fragment
  265.         MakeFlat "{ObjectsDir}{TargetNameILink}".seg -o "{TargetDir}{TargetNameILink}"
  266.         Echo Copying: {TargetNameILink}∂'s resources
  267.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.68k.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  268.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNameILink}"
  269.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  270.     End
  271.  
  272. # --- PowerPC Link ---
  273.  
  274. "{TargetDir}{TargetNamePPCLink}" ƒƒ        {SoundEditorOBJECTS}            ∂
  275.                                         {somSoundEditorOBJECTS}        ∂
  276.                                         {OpenDocUtilityOBJECTS}        ∂
  277.                                         "{somSourceDir}som_SoundEditor.exp"
  278.     Echo Linking: {TargetNamePPCLink}
  279.     {LinkTool}    ∂
  280.         -export `ConvertExportList "{somSourceDir}som_SoundEditor.exp"` ∂
  281.         {PPCLinkOptions}                                    ∂
  282.         {PPCLinkShLibOptions}                                ∂
  283.         -init SoundEditorCFMInit                            ∂
  284.         -verCur {CurrentLibraryVersion}                        ∂
  285.         -verDef {LibraryExportsVersion}                        ∂
  286.         -verImp {LibraryCodeVersion}                        ∂
  287.         {PPCShLibPreLibraries}                                ∂
  288.         {SoundEditorOBJECTS}                                ∂
  289.         {somSoundEditorOBJECTS}                                ∂
  290.         {OpenDocUtilityOBJECTS}                                ∂
  291.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  292.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  293.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  294.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  295.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  296.         "{ODCFMLibrariesDir}OpenDoc Messaging.stub"            ∂
  297.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  298.         {PPCShLibPostLibraries}                                ∂
  299.         -o "{ObjectsDir}{TargetNamePPCLink}"
  300.     If !{Status}
  301.         Move -y "{ObjectsDir}{TargetNamePPCLink}" "{TargetDir}"
  302.         if ( `exists "{ObjectsDir}{TargetNamePPCLink}".xcoff != ""` )
  303.             Echo Building: {TargetNamePPCLink}.xSYM
  304.             {SymTool} "{ObjectsDir}{TargetNamePPCLink}".xcoff            ∂
  305.                     {AdditionalIncludes} -i "{ODUtilsImplDir}"            ∂
  306.                     -sym on,3.2 -o "{TargetDir}{TargetNamePPCLink}".xSYM
  307.         end
  308.         Echo Copying: {TargetNamePPCLink}∂'s resources
  309.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.PPC.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  310.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  311.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  312.     End
  313.  
  314. #---------------------------------------------------------------------------    
  315. # REZ STEPS
  316. #---------------------------------------------------------------------------    
  317.  
  318. "{RsrcObjectsDir}{TargetName}.PPC.rsrc"    ƒ                                ∂
  319.                                         "{SourceDir}SoundEditor.r"        ∂
  320.                                         "{SourceDir}SoundEditorDef.h"    ∂
  321.                                         "{SourceDir}SoundEditorVers.h"    ∂
  322.                                         "{SourceDir}SoundEditorOtherResources.rsrc"
  323.     Echo Rezzing: {TargetName}.r (for PPC)
  324.     Rez {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {Targ}
  325.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  326.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  327.     if ( `exists "{TargetDir}{TargetNamePPCLink}" != ""` )
  328.         Echo Copying: {TargetNamePPCLink}∂'s resources
  329.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  330.     end    
  331.  
  332. "{RsrcObjectsDir}{TargetName}.68k.rsrc"    ƒ                                ∂
  333.                                         "{SourceDir}SoundEditor.r"        ∂
  334.                                         "{SourceDir}SoundEditorDef.h"    ∂
  335.                                         "{SourceDir}SoundEditorVers.h"    ∂
  336.                                         "{SourceDir}SoundEditorOtherResources.rsrc"
  337.     Echo Rezzing: {TargetName}.r (for 68k)
  338.     Rez -d _68KBUILD_ {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {Targ}
  339.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  340.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  341.     if ( `exists "{TargetDir}{TargetNameILink}" != ""` )
  342.         Echo Copying: {TargetNameILink}∂'s resources
  343.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  344.     end
  345.